<div class="sidebar-wrapper">
  <div class="sidebar" ng-controller="Documents as document">
    <h2 class="sidebar-branding">
      <%- include icons/branding %>
    </h2>

    <nav class="nav nav-sidebar">
      <ul class="menu menu-sidebar">

        <li class="menu-item menu-item--link-unlink in-sidebar">
          <a class="menu-link" ng-click="document.status.linkUnlink = !document.status.linkUnlink">
          <span>Services</span> <span class="caret"></span></a>

          <ul class="sidebar-list" collapse="document.status.linkUnlink">
            <%- include dropdowns/link_unlink %>
          </ul>
        </li>

        <li class="menu-item menu-item--save-to in-sidebar">
          <a class="menu-link" ng-click="document.status.save = !document.status.save">
          <span>Save to</span> <span class="caret"></span></a>

          <ul class="sidebar-list" collapse="document.status.save">
            <%- include dropdowns/save_to %>
          </ul>
        </li>
        <li class="menu-item menu-item--import-from in-sidebar">
          <a class="menu-link" ng-click="document.status.import = !document.status.import">
          <span>Import from</span> <span class="caret"></span></a>

          <ul class="sidebar-list" collapse="document.status.import">
            <%- include dropdowns/import_from %>
          </ul>
        </li>
        <li class="menu-item menu-item--documents in-sidebar">
          <a class="menu-link" ng-click="document.status.document = !document.status.document">
          <span>Documents</span> <span class="caret"></span></a>

          <ul class="documents sidebar-list" collapse="document.status.document" role="menu">
            <%- include dropdowns/documents %>
          </ul>
        </li>
      </ul>
    </nav>
    <a class="btn btn--new" ng-click="createDocument()">New Document</a>
    <a class="btn btn--save" ng-click="saveDocument(true)">Save Session</a>
    <a class="btn btn--delete"
       ng-click="removeDocument(currentDocument)"
       ng-if="documents.length > 1">Delete Document</a>
  </div>
</div>
